<template>
  <div>
    <van-collapse
      v-model="activeName"
      accordion
    >
      <van-collapse-item
        title="基本信息"
        name="1"
        icon="coupon-o"
      >
        <template>
          <van-row>
            <van-col span="5"><span class="spanTitle">记录单位</span></van-col>
            <van-col span="19"><span class="spanValue">{{form.EnterpriseName}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="5"><span class="spanTitle">演练科目</span></van-col>
            <van-col span="19"><span class="spanValue">{{form.PlanSubject}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="5"><span class="spanTitle">组织单位</span></van-col>
            <van-col span="19"><span class="spanValue">{{form.OrganizeUnit}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="5"><span class="spanTitle">主持人</span></van-col>
            <van-col span="19"><span class="spanValue">{{form.Moderator}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="5"><span class="spanTitle">演练时间</span></van-col>
            <van-col span="19"><span class="spanValue">{{form.PlanDate|formatDate}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="5"><span class="spanTitle">演练地点</span></van-col>
            <van-col span="19"><span class="spanValue">{{form.PlanAddress}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="24">
              <span class="spanTitle">参演单位人员构成</span>
            </van-col>
          </van-row>
          <van-row>
            <van-col span="5"></van-col>
            <van-col span="19"><span class="spanValue">{{form.PartakeOrganizePersonName}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="5"><span class="spanTitle">演练类型</span></van-col>
            <van-col span="19"><span class="spanValue">{{form.PlanTypeName}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="5"><span class="spanTitle">演练目的</span></van-col>
            <van-col span="19"><span class="spanValue">{{form.PlanPurpose}}</span></van-col>
          </van-row>
        </template>
      </van-collapse-item>
      <van-collapse-item
        title="演练前准备工作"
        name="2"
        icon="newspaper-o"
      >
        <template>
          <van-row>
            <van-col span="7"><span class="spanTitle">演练总指挥</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.Commander}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="7"><span class="spanTitle">演练副总指挥</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.DeputyCommander}}</span></van-col>
          </van-row>
        </template>
      </van-collapse-item>
      <van-collapse-item
        title="演练分工"
        name="3"
        icon="points"
      >
        <template>
          <van-row v-show="form.EmergencyLeader!=null||form.EmergencyLeader!=''">
            <van-col span="7"><span class="spanTitle">应急抢险组长</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.EmergencyLeader}}</span></van-col>
          </van-row>
          <van-row v-show="form.EmergencyLeader!=null||form.EmergencyLeader!=''">
            <van-col span="7"><span class="spanTitle">应急抢险组员</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.EmergencyMember}}</span></van-col>
          </van-row>
          <van-row v-show="form.MedicalLeader!=null||form.MedicalLeader!=''">
            <van-col span="7"><span class="spanTitle">医疗救护组长</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.MedicalLeader}}</span></van-col>
          </van-row>
          <van-row v-show="form.MedicalMember!=null||form.MedicalMember!=''">
            <van-col span="7"><span class="spanTitle">医疗救护组员</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.MedicalMember}}</span></van-col>
          </van-row>
          <van-row v-show="form.WarnLeader!=null">
            <van-col span="7"><span class="spanTitle">警戒疏散组长</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.WarnLeader}}</span></van-col>
          </van-row>
          <van-row v-show="form.WarnLeader!=null">
            <van-col span="7"><span class="spanTitle">警戒疏散组员</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.WarnMember}}</span></van-col>
          </van-row>
          <van-row v-show="form.LogisticsMember!=null">
            <van-col span="7"><span class="spanTitle">后勤保障组长</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.LogisticsLeader}}</span></van-col>
          </van-row>
          <van-row v-show="form.LogisticsMember!=null">
            <van-col span="7"><span class="spanTitle">后勤保障组员</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.LogisticsMember}}</span></van-col>
          </van-row>
          <van-row v-show="form.AftermathLeader!=null">
            <van-col span="7"><span class="spanTitle">善后处理组长</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.AftermathLeader}}</span></van-col>
          </van-row>
          <van-row v-show="form.AftermathLeader!=null">
            <van-col span="7"><span class="spanTitle">善后处理组员</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.AftermathMember}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="24">
              <span class="spanTitle">演练所需应急物资或器材</span>
            </van-col>
          </van-row>
          <van-row>
            <van-col span="4"></van-col>
            <van-col span="20"><span class="spanValue">{{form.Consumables}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="24">
              <span class="spanTitle">演练场景布置</span>
            </van-col>
          </van-row>
          <van-row>
            <van-col span="4"></van-col>
            <van-col span="20"><span class="spanValue">{{form.StudyArea}}</span></van-col>
          </van-row>
        </template>
      </van-collapse-item>
      <van-collapse-item
        title="演练前教育培训"
        name="4"
        icon="friends-o"
      >
        <template>
          <van-row>
            <van-col span="24"><span class="spanTitle">教育培训内容</span></van-col>
          </van-row>
          <van-row>
            <van-col span="4"></van-col>
            <van-col span="20"><span class="spanValue">{{form.TrainContents}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="24">
              <span class="spanTitle">教育培训照片</span>
            </van-col>
          </van-row>
          <van-row>
            <van-col span="4"></van-col>
            <van-col span="20">
              <eagle-image-preview
                class="mt-10"
                :images="form.TrainEducationFile"
              >
              </eagle-image-preview>
            </van-col>
          </van-row>
        </template>
      </van-collapse-item>
      <van-collapse-item
        title="演练过程"
        name="5"
        icon="send-gift-o"
      >
        <template>
          <van-row>
            <van-col span="24"><span class="spanTitle">演练流程概述</span></van-col>
          </van-row>
          <van-row>
            <van-col span="4"></van-col>
            <van-col span="20"><span class="spanValue">{{form.Describe}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="24"><span class="spanTitle">演练流程概述照片</span></van-col>
          </van-row>
          <van-row>
            <van-col span="4"></van-col>
            <van-col span="20">
              <eagle-image-preview
                class="mt-10"
                :images="form.DescribeFile"
              >
              </eagle-image-preview>
            </van-col>
          </van-row>
        </template>
      </van-collapse-item>
      <van-collapse-item
        title="预案适应性和充分性评审"
        name="6"
        icon="coupon-o"
      >
        <template>
          <van-row>
            <van-col span="7"><span class="spanTitle">预案适应性</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.AdaptabilityName}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="7"><span class="spanTitle">预案充分性</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.AdequacyName}}</span></van-col>
          </van-row>
        </template>
      </van-collapse-item>
      <van-collapse-item
        title="演练效果评估评审"
        name="7"
        icon="cluster-o"
      >
        <template>
          <van-row>
            <van-col span="7"><span class="spanTitle">人员到位情况</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.PersonInPlaceName}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="7"><span class="spanTitle">人员技能情况</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.PersonSkillName}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="7"><span class="spanTitle">物资到位情况</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.MaterialsInPlaceName}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="7"><span class="spanTitle">人员防护情况</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.PersonProtectName}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="7"><span class="spanTitle">组织协调情况</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.OrganizeInfoName}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="24">
              <span class="spanTitle">组织协调抢险救援情况</span>
            </van-col>
          </van-row>
          <van-row>
            <van-col span="7"></van-col>
            <van-col span="17"><span class="spanValue">{{form.OrganizeRescueName}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="7"><span class="spanTitle">实战效果评价</span></van-col>
            <van-col span="17"><span class="spanValue">{{form.ActualSituationName}}</span></van-col>
          </van-row>
        </template>
      </van-collapse-item>
      <van-collapse-item
        title="演练结束"
        name="8"
        icon="ecard-pay"
      >
        <template>
          <van-row>
            <van-col span="24">
              <span class="spanTitle">整改及改进措施</span>
            </van-col>
          </van-row>
          <van-row>
            <van-col span="5"></van-col>
            <van-col span="19">
              <span class="spanValue">{{form.Problem}}</span>
            </van-col>
          </van-row>
          <van-row>
            <van-col span="5"><span class="spanTitle">演练总结</span></van-col>
            <van-col span="19"><span class="spanValue">{{form.PlanSummary}}</span>
            </van-col>
          </van-row>
          <van-row>
            <van-col span="24"><span class="spanTitle">总结、讲评人签字</span></van-col>
          </van-row>
          <van-row>
            <van-col span="5"></van-col>
            <van-col span="19"><span class="spanValue">{{form.TrainerSign}}</span></van-col>
          </van-row>
          <van-row>
            <van-col span="24">
              <span class="spanTitle">教育培训照片</span>
            </van-col>
          </van-row>
          <van-row>
            <van-col span="5"></van-col>
            <van-col span="19">
              <eagle-image-preview
                class="mt-10"
                :images="form.TrainerFile"
              >
              </eagle-image-preview>
            </van-col>
          </van-row>
        </template>
      </van-collapse-item>
    </van-collapse>
  </div>
</template>
<script>
import { gxEmergencyPlanDetail } from "@/api/gx";

export default {
  data() {
    return {
      id: this.$route.query.id,
      autoSize: { minRows: 1 },
      form: {},
      activeName: "1",
    };
  },
  created() {
    this.getDetail();
  },
  methods: {
    getDetail() {
      var me = this;
      let params = { id: this.id };
      gxEmergencyPlanDetail(params).then((res) => {
        me.form = res.data;
      });
    },
  },
};
</script>
<style lang="less">
.spanTitle {
  font-size: 14px;
  color: #646566;
  line-height: 30px;
}
.spanValue {
  font-size: 14px;
  color: #323233;
  line-height: 30px;
}
</style>